package diploma.kisel.modelas.gui;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.SpringLayout;
import javax.swing.JLabel;
import java.awt.Font;

public class AboutProgramWindow extends JFrame {

	private JPanel contentPane;
	
	private static AboutProgramWindow frame;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					frame = new AboutProgramWindow();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public AboutProgramWindow() {
		setTitle("О программе");
//		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 406, 266);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		SpringLayout sl_contentPane = new SpringLayout();
		contentPane.setLayout(sl_contentPane);
		
		JLabel lblNewLabel = new JLabel("Название:");
		lblNewLabel.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblNewLabel, 10, SpringLayout.NORTH, contentPane);
		sl_contentPane.putConstraint(SpringLayout.WEST, lblNewLabel, 10, SpringLayout.WEST, contentPane);
		contentPane.add(lblNewLabel);
		
		JLabel lblModelAs = new JLabel("Model AS");
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblModelAs, 0, SpringLayout.NORTH, lblNewLabel);
		sl_contentPane.putConstraint(SpringLayout.WEST, lblModelAs, 89, SpringLayout.EAST, lblNewLabel);
		lblModelAs.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		contentPane.add(lblModelAs);
		
		JLabel label = new JLabel("Версия:");
		sl_contentPane.putConstraint(SpringLayout.NORTH, label, 29, SpringLayout.SOUTH, lblNewLabel);
		sl_contentPane.putConstraint(SpringLayout.WEST, label, 0, SpringLayout.WEST, lblNewLabel);
		label.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		contentPane.add(label);
		
		JLabel label_1 = new JLabel("1.0");
		sl_contentPane.putConstraint(SpringLayout.WEST, label_1, 0, SpringLayout.WEST, lblModelAs);
		sl_contentPane.putConstraint(SpringLayout.SOUTH, label_1, 0, SpringLayout.SOUTH, label);
		label_1.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		contentPane.add(label_1);
		
		JLabel label_2 = new JLabel("Разработчик:");
		sl_contentPane.putConstraint(SpringLayout.NORTH, label_2, 32, SpringLayout.SOUTH, label);
		sl_contentPane.putConstraint(SpringLayout.WEST, label_2, 0, SpringLayout.WEST, lblNewLabel);
		label_2.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		contentPane.add(label_2);
		
		JLabel label_3 = new JLabel("Кисель Николай");
		sl_contentPane.putConstraint(SpringLayout.WEST, label_3, 0, SpringLayout.WEST, lblModelAs);
		sl_contentPane.putConstraint(SpringLayout.SOUTH, label_3, 0, SpringLayout.SOUTH, label_2);
		label_3.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		contentPane.add(label_3);
		
		JLabel label_4 = new JLabel("Контакты:");
		sl_contentPane.putConstraint(SpringLayout.NORTH, label_4, 36, SpringLayout.SOUTH, label_2);
		sl_contentPane.putConstraint(SpringLayout.WEST, label_4, 0, SpringLayout.WEST, lblNewLabel);
		label_4.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		contentPane.add(label_4);
		
		JLabel lblKiselnikolaygmailcom = new JLabel("kisel.nikolay@gmail.com");
		sl_contentPane.putConstraint(SpringLayout.NORTH, lblKiselnikolaygmailcom, 0, SpringLayout.NORTH, label_4);
		sl_contentPane.putConstraint(SpringLayout.WEST, lblKiselnikolaygmailcom, 0, SpringLayout.WEST, lblModelAs);
		lblKiselnikolaygmailcom.setFont(new Font("Comic Sans MS", Font.PLAIN, 15));
		contentPane.add(lblKiselnikolaygmailcom);
	}

	public static AboutProgramWindow getFrame() {
		return frame;
	}

	public static void setFrame(AboutProgramWindow frame) {
		AboutProgramWindow.frame = frame;
	}	
	
}
